package com.melon.common.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;

import javax.validation.Validator;

/**
 * Created with IntelliJ IDEA.
 * Author: Xiong Jin Teng
 * Date: 2016/9/12
 * Time: 17:34
 */

@Configuration
public class SysConfig {

    @Bean(name = "validator")
    public Validator validator() {
        LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
        return bean;
    }
}
